package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.SaleRebatesRulesExample.E_CONTINUE_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRulesExample.E_NEW_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRulesExample.E_REGION;
import static org.jsola.hr.example.SaleRebatesRulesExample.E_REMARK;
import static org.jsola.hr.example.SaleRebatesRulesExample.E_RULES_NAME;
import static org.jsola.hr.example.SaleRebatesRulesExample.E_SUBJECT_TYPE;
import static org.jsola.hr.example.SaleRebatesRulesExample.M_REGION_MAX;
import static org.jsola.hr.example.SaleRebatesRulesExample.M_REMARK_MAX;
import static org.jsola.hr.example.SaleRebatesRulesExample.M_RULES_NAME_MAX;
import static org.jsola.hr.example.SaleRebatesRulesExample.M_RULES_NAME_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRulesExample.M_SUBJECT_TYPE_MAX;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_CONTINUE_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_NEW_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_REGION;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_REMARK;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_RULES_NAME;
import static org.jsola.hr.example.SaleRebatesRulesExample.N_SUBJECT_TYPE;

/**
 * 返费规则
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【返费规则】的参数")
@Data
public class SaleRebatesRulesAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_RULES_NAME, example = E_RULES_NAME, required = true)
    @NotNull(message = M_RULES_NAME_NOT_NULL)
    @Length(max = 50, message = M_RULES_NAME_MAX)
    private String rulesName;

    @ApiModelProperty(notes = N_SUBJECT_TYPE, example = E_SUBJECT_TYPE)
    @Length(max = 50, message = M_SUBJECT_TYPE_MAX)
    private String subjectType;

    @ApiModelProperty(notes = N_REGION, example = E_REGION)
    @Length(max = 50, message = M_REGION_MAX)
    private String region;

    @ApiModelProperty(notes = N_NEW_PROPORTION, example = E_NEW_PROPORTION)
    private BigDecimal newProportion;

    @ApiModelProperty(notes = N_CONTINUE_PROPORTION, example = E_CONTINUE_PROPORTION)
    private BigDecimal continueProportion;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;


}

